<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePrtCurrencyTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('prt_currency', function (Blueprint $table) {
            $table->increments('id');
            $table->string('sys_code',20)->default("")->comment('系统编码');
            $table->string('name',20)->default("")->comment('名称');
            $table->string('sort_name',20)->default("")->comment('简称');
            $table->integer('unit_precision')->default(0)->comment("单价精度")->nullable();
            $table->integer('money_precision')->default(0)->comment("金额精度")->nullable();
            $table->integer('priority')->default(0)->comment("优先级")->nullable();
            $table->tinyInteger('is_middle')->default(0)->comment("中间币")->nullable();
            $table->tinyInteger('status')->default(1)->comment('启用状态');
            $table->tinyInteger('check_status')->default(1)->comment('审核状态');
            $table->integer('creator_uid')->default(0)->comment("创建人")->nullable();
            $table->integer('updater_uid')->default(0)->comment("修改人")->nullable();
            $table->integer('created_at')->comment("创建时间")->nullable();
            $table->integer('updated_at')->comment("更新时间")->nullable();
            $table->integer('deleted_at')->default(null)->comment("删除时间")->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('prt_currency');
    }
}
